<template>
  <div>
    <swiper class="swiper" :options="swiperOption">
      <swiper-slide v-for="(item, index) in banners" :key="index">
        <a><img :src="item" alt="" /></a>
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
    <div class="center hot_goods clearfix">
      <div>
        <span>热销单品</span>
        <span>好花价美丽,浪漫不打折</span>
      </div>
      <div class="goods1">
        <h4><span>优雅礼盒</span>&nbsp;|&nbsp;<span>11枝</span></h4>
        <img src="../assets/img/rose_goods/hot_02.png" alt="" />
      </div>
      <div class="goods1">
        <h4><span>魅惑红玫瑰</span> | <span>19枝</span></h4>
        <img src="../assets/img/rose_goods/hot_01.png" alt="" />
      </div>
      <div class="goods2">
        <div>
          <div>
            <h4>时尚混搭风花束</h4>
            <div></div>
            <span>安娜粉玫瑰</span>
          </div>
          <img src="../assets/img/rose_goods/hot_03.png" alt="" />
        </div>
        <div>
          <div>
            <h4>温暖且俏丽</h4>
            <div></div>
            <span>香槟玫瑰</span>
          </div>
          <img src="../assets/img/rose_goods/hot_04.png" alt="" />
        </div>
      </div>
    </div>
    <index-cell />
  </div>
</template>

<script>
import IndexCell from "../components/IndexCell.vue"
export default {
  components: { IndexCell },
  data() {
    return {
      banners: [
        require("../assets/img/index/banner1.png"),
        require("../assets/img/index/banner4.png"),
        require("../assets/img/index/banner2.png"),
        require("../assets/img/index/banner3.png"),
        require("../assets/img/index/banner5.jpg"),
      ],
      swiperOption: {
        loop: true,
        autoplay: {
          delay: 2500,
          disableOnInteraction: false,
        },
        pagination: {
          el: ".swiper-pagination",
          clickable: true,
        },
      },
    }
  },
}
</script>

<style lang="scss">
@import url("../assets/css/index.css");
.swiper {
  img {
    width: 100%;
    display: block;
  }
  .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
  }
}
</style>
